import qs from "qs";
import service from "api/request";

// 获取头条新闻列表
export function headLinesNews(
  page = 1,
  address = "https://apis.tianapi.com/topnews/index"
) {
  return service({
    method: "post",
    url: address,
    data: qs.stringify({
      key: "19b2e2cd8c1f8245f4603ebfe5c3860d",
      num: 10,
      page: page,
      // word: "中国",
      // src: "新华日报",
    }),
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
}
